package com.example.demo.controller;


import com.example.demo.entity.PhysicalExaminationEntity;
import com.example.demo.entity.ResultEntity;
import com.example.demo.result.Result;
import com.example.demo.result.ResultUtil;
import com.example.demo.service.impl.PhysicalExaminationServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class PhysicalExaminationController {

    @Autowired
    private PhysicalExaminationServiceImpl physicalExaminationService;

    @GetMapping("/getMsg")
    public Result getMsg(String serialNumber){
        return physicalExaminationService.getMsg(serialNumber);
    }

    @PostMapping("/updateResult")
    public Result updateResult(@RequestBody PhysicalExaminationEntity physicalExaminationEntity){

        return physicalExaminationService.updateResult(physicalExaminationEntity);
    }

    @RequestMapping("/insertNewResult")
    public Result insertNewResult(String serialNumber){
        return physicalExaminationService.insertNewResult(serialNumber);
    }




}
